<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>能耗计划管理</title>
<link href="css/lyz.calendar.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="js/jquery-1.5.1.js"></script>
<script src="js/lyz.calendar.min.js" type="text/javascript"></script>
<style>
body {
	font-size: 12px;
	font-family: "微软雅黑", "宋体", "Arial Narrow";
}
</style>
<script>
	$(function() {
		$("#txtBeginDate").calendar({
			controlId : "divDate", // 弹出的日期控件ID，默认: $(this).attr("id") + "Calendar"
			speed : 200, // 三种预定速度之一的字符串("slow", "normal", or "fast")或表示动画时长的毫秒数值(如：1000),默认：200
			complement : true, // 是否显示日期或年空白处的前后月的补充,默认：true
			readonly : true, // 目标对象是否设为只读，默认：true
			upperLimit : new Date(), // 日期上限，默认：NaN(不限制)
			lowerLimit : new Date("2011/01/01"), // 日期下限，默认：NaN(不限制)
			callback : function() { // 点击选择日期后的回调函数
				
			}
		});
		$("#txtEndDate").calendar();
	});
	
	$(document).ready(function() {
		$('#txtBeginDate').blur(function() {
			var begindate = document.getElementById('txtBeginDate').value;
			setBeginDate(begindate)
		})

		$('#txtEndDate').blur(function() {
			var enddate = document.getElementById('txtEndDate').value;
			setEndDate(enddate)
		})

		$('#select').blur(function() {
			var select = document.getElementById('select').value;
			setSelect(select)
		})
	})

	function setBeginDate(begindate) {

		$
				.ajax({
					type : 'post',
					url : '${pageContext.request.contextPath}/dayYear/setBeginDate.action',
					data : 'beginDate=' + begindate,
					success : function(data) {

					}
				})
	}

	function setEndDate(enddate) {

		$
				.ajax({
					type : 'post',
					url : '${pageContext.request.contextPath}/dayYear/setEndDate.action',
					data : 'endDate=' + enddate,
					success : function(data) {

					}
				})
	}

	function setSelect(select) {

		$
				.ajax({
					type : 'post',
					url : '${pageContext.request.contextPath}/dayYear/setSelect.action',
					data : 'select=' + select,
					success : function(data) {

					}
				})
	}

	function getPeriods() {

		$
				.ajax({
					type : 'post',
					url : '${pageContext.request.contextPath}/dayYear/setPeriods.action',
					success : function(data) {
						window.location.href = "${pageContext.request.contextPath}/jsp/consum_plan_manage.jsp";
					}
				})
	}

	function init() {
		window.location.href = "${pageContext.request.contextPath}/dayYear/getList1.action";
	}
</script>
</head>
<body>
	<div style="width: 1100px; margin-left: 20px;">
		时间： <input id="txtBeginDate" name="txtBeginDate"
			style="width: 170px; padding: 7px 10px; border: 1px solid #ccc; margin-right: 10px;" />
		至 <input id="txtEndDate" name="txtEndDate"
			style="width: 170px; padding: 7px 10px; border: 1px solid #ccc;" />

		<button onclick="getPeriods()">查询</button>
		<hr>
	</div>

	<div id="content" style="width: 1100px; height: 1000px;">
	   <br>
		<iframe src="a5.jsp" id="myiframe" scrolling="no" frameborder="0"
			style="width: 800px; height: 800px; float: left;">这是A</iframe>

		<div id="note" style="width: 300px; height: 1000px; float: left;">
			<p>耗能计划设置：</p>
			<div
				style="filter: glow(color = #000000, strength = 1); color: #000000；height:10px;">
				<font size=3> <marquee
						style="width: 213px; height: 300px; color: green;"
						scrollamount="2" scrolldelay="1" direction="up" width="213"
						height="280">
						<p align="left">
							水能消耗控制中...<br>
							<br>电能消耗控制中...<br>
							<br>天然气消耗超标!!!<br>
							<br>汽油消耗控制中...<br>
							<br>柴油消耗控制中...<br>
							<br>煤消耗超标!!!<br>
							<br>故障预警设置启动...<br>
							<br>数据库更新启动...<br>
							<br>数据自动统计启动...<br>
							<br>实时监控启动...<br>
							<br>ActiveMq启动...<br>

						</p>
					</marquee>
				</font>

			</div>
		</div>
	</div>
</body>
</html>